// 菜单接口

import axios from "../utils/request";

// 树形菜单
export const getMenusApi = () =>
  axios({
    url: "/menu/index",
    method: "get",
  });

// 新增
export const addMenuApi = (data) =>
  axios({
    url: "/api/menuadd",
    method: "post",
    data,
  });

// 删除
export const delMenuApi = (id) =>
  axios({
    url: "/api/menudelete",
    method: "post",
    data: { id },
  });

// 编辑
export const editMenuApi = (data) =>
  axios({
    url: "/api/menuedit",
    method: "post",
    data,
  });
